| Conditions | 1 |
| Paths | 1 |
| Total Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | /* eslint-env mocha */ |
||
| 9 | describe('Unit', function () { |
||
| 10 | describe('/Utility', function () { |
||
| 11 | describe('/Objects.js', function () { |
||
| 12 | describe('.Objects', function () { |
||
| 13 | describe('.copy', function () { |
||
| 14 | var variants = [1, 1.0, true, false, null, undefined, 'string'] |
||
| 15 | variants.forEach(function (value) { |
||
| 16 | it('passes through primitive value', function () { |
||
| 17 | allure.addArgument('input', value) |
||
| 18 | expect(Objects.copy(value)).to.equal(value) |
||
| 19 | }) |
||
| 20 | }) |
||
| 21 | |||
| 22 | it('copies array contents', function () { |
||
| 23 | var value = [1, 2, 3] |
||
| 24 | var copy = Objects.copy(value) |
||
| 25 | expect(copy).not.to.equal(value) |
||
| 26 | expect(copy).to.deep.eq(value) |
||
| 27 | }) |
||
| 28 | }) |
||
| 29 | |||
| 30 | describe('.merge', function () { |
||
| 31 | // TODO: write tests for all cases |
||
| 32 | }) |
||
| 33 | }) |
||
| 34 | }) |
||
| 35 | }) |
||
| 36 | }) |
||
| 37 |